<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
>
    <xsl:output method="html" indent="yes"/>


  <xsl:template match="computerwinkel">
    <xsl:param name="rijID" select="2" />
    <xsl:param name="vakID" select="2" />
    <xsl:param name="artikelID" select="1" />
    
    <html>
      <h1></h1>
      <body>

        <xsl:apply-templates select="rijen/rij[$rijID]">
          <xsl:sort select="$rijID" data-type="number" order="ascending"/>
        </xsl:apply-templates>

        <xsl:apply-templates select="rijen/rij/vakken/vak[$vakID]">
          <xsl:sort select="$vakID" data-type="number" order="ascending"/>
        </xsl:apply-templates>
        
        
        <xsl:apply-templates select="artikelen/artikel[$artikelID]">
          <xsl:sort select="$artikelID" data-type="number" order="ascending"/>
        </xsl:apply-templates>
      </body>
    </html>
  </xsl:template>


  <xsl:template match="rij">
    <table>
      <tr>
        <td>Rij_nummer: </td>
        <td>
          <xsl:value-of select="rij_nummer"/>
        </td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template match="vak">
    <table>
      <tr>
        <td>Vaknummer: </td>
        <td>
          <xsl:value-of select="vak_nummer"/>
        </td>
      </tr>
      <tr>
        <td>Aantal: </td>
        <td>
          <xsl:value-of select="aantal"/>
        </td>
      </tr>
    </table>
  </xsl:template>
  
  <xsl:template match="artikel">

    <table>
      <tr>
        <td>Artikel: </td>
        <td>
          <xsl:value-of select="artikel_naam"/>
        </td>
      </tr>
      <tr>
        <td>Prijs: </td>
        <td>
          <xsl:value-of select="prijs"/>
        </td>
      </tr>
      <tr>
        <td>Merk: </td>
        <td>
          <xsl:value-of select="merk"/>
        </td>
      </tr>
      <tr>
        <td>Type: </td>
        <td>
          <xsl:value-of select="type"/>
        </td>
      </tr>
    </table>
  </xsl:template>
</xsl:stylesheet>
